﻿using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Mefisto4.Core.MEF;

namespace Mefisto4
{
    public class MvcApplication : HttpApplication
    {
        protected void Application_Start()
        {
            //HostingEnvironment.RegisterVirtualPathProvider(new AssemblyResourceVirtualPathProvider());
            
            //ControllerBuilder.Current.SetControllerFactory(new MEFControllerFactory());

            AreaRegistration.RegisterAllAreas();

            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            DependencyResolver.SetResolver(new MEFDependencyResolver(CompositionContainerFactory.CreateContainer()));
        }
    }
}